//对外暴露配置路由(常量路由)
export const constantRoutes = [
  {
    path: '/login',
    name: 'Login', //命令路由
    component: () => import('@/views/login/index.vue'),
    meta: {
      title: '登录',
      hidden: true, //菜单是否隐藏
      icon: 'User', //菜单图标
    },
  },
  {
    path: '/',
    name: 'Layout',
    component: () => import('@/layout/index.vue'),
    redirect: '/home', //重定向到首页
    meta: {
      title: '',
      hidden: true, //菜单是否隐藏
      icon: 'HomeFilled', //菜单图标
    },
    children: [
      {
        path: '/home',
        name: 'Home',
        component: () => import('@/views/home/index.vue'),
        meta: {
          title: '首页',
          hidden: false, //菜单是否隐藏
          icon: 'HomeFilled', //菜单图标
        },
      },
    ],
  },
  {
    path: '/screen',
    name: 'Screen',
    component: () => import('@/views/screen/index.vue'),
    meta: {
      title: '数据大屏',
      hidden: false, //菜单是否隐藏
      icon: 'Platform', //菜单图标
    },
  },
  {
    path: '/permission',
    name: 'Permission',
    component: () => import('@/layout/index.vue'), //重定向到用户管理
    meta: {
      title: '权限管理',
      hidden: false, //菜单是否隐藏
      icon: 'Lock', //菜单图标
    },
    redirect: '/permission/user',
    children: [
      {
        path: '/permission/user',
        name: 'user',
        component: () => import('@/views/permission/user/index.vue'),
        meta: {
          title: '用户管理',
          hidden: false, //菜单是否隐藏
          icon: 'Avatar', //菜单图标
        },
      },
      {
        path: '/permission/role',
        name: 'Role',
        component: () => import('@/views/permission/role/index.vue'),
        meta: {
          title: '角色管理',
          hidden: false, //菜单是否隐藏
          icon: 'Setting', //菜单图标
        },
      },
      {
        path: '/permission/menu',
        name: 'menu',
        component: () => import('@/views/permission/menu/index.vue'),
        meta: {
          title: '菜单管理',
          hidden: false, //菜单是否隐藏
          icon: 'Promotion', //菜单图标
        },
      },
    ],
  },
  {
    path: '/product',
    name: 'Product',
    component: () => import('@/layout/index.vue'),
    meta: {
      title: '商品管理',
      hidden: false, //菜单是否隐藏
      icon: 'Goods', //菜单图标
    },
    redirect: '/product/trademark',
    children: [
      {
        path: '/product/trademark',
        name: 'Trademark',
        component: () => import('@/views/product/trademark/index.vue'),
        meta: {
          title: '品牌管理',
          hidden: false, //菜单是否隐藏
          icon: 'ShoppingCartFull', //菜单图标
        },
      },
      {
        path: '/product/attr',
        name: 'Attr',
        component: () => import('@/views/product/attr/index.vue'),
        meta: {
          title: '属性管理',
          hidden: false, //菜单是否隐藏
          icon: 'ChromeFilled', //菜单图标
        },
      },
      {
        path: '/product/sku',
        name: 'Sku',
        component: () => import('@/views/product/sku/index.vue'),
        meta: {
          title: 'SKU管理',
          hidden: false, //菜单是否隐藏
          icon: 'Calendar', //菜单图标
        },
      },
      {
        path: '/product/spu',
        name: 'Spu',
        component: () => import('@/views/product/spu/index.vue'),
        meta: {
          title: 'SPU管理',
          hidden: false, //菜单是否隐藏
          icon: 'Orange', //菜单图标
        },
      },
    ],
  },
  {
    path: '/404',
    name: '404',
    component: () => import('@/views/404/index.vue'),
    meta: {
      title: '404',
      hidden: true, //菜单是否隐藏
      icon: 'Folder', //菜单图标
    },
  },
  {
    path: '/:pathMatch(.*)*',
    name: 'Any',
    redirect: '/404',
    meta: {
      title: '任意路由',
      hidden: true, //菜单是否隐藏
      icon: 'DataLine', //菜单图标
    },
  },
  {
    path: '/demo',
    name: 'Demo',
    component: () => import('@/layout/index.vue'),
    meta: {
      title: '',
      hidden: false, //菜单是否隐藏
      icon: 'Plus', //菜单图标
    },
    children: [
      {
        path: '/demo2',
        name: 'demo2',
        component: () => import('@/views/HomeView.vue'),
        meta: {
          title: '日期时间', //菜单标题
          hidden: false, //菜单是否隐藏
          icon: 'Edit', //菜单图标
        },
      },
    ],
  },
  {
    path: '/passArgs',
    name: 'passArgs',
    component: () => import('@/layout/index.vue'),
    meta: {
      title: '组件传参',
      hidden: false, //菜单是否隐藏
      icon: 'User', //菜单图标
    },
    redirect: '/passArgs/slot',
    children: [
      {
        path: '/passArgs/slot',
        name: 'Slot',
        component: () => import('../demo/slot/SlotTest.vue'),
        meta: {
          title: '插槽',
          hidden: false, //菜单是否隐藏
          icon: 'Avatar', //菜单图标
        },
      },
      {
        path: '/passArgs/proinject',
        name: 'Proinject',
        component: () => import('../demo/proinject/ProvideInjectTest.vue'),
        meta: {
          title: '提供/注入',
          hidden: false, //菜单是否隐藏
          icon: 'Tools', //菜单图标
        },
      },
      {
        path: '/passArgs/props',
        name: 'Props',
        component: () => import('../demo/props/PropsTest.vue'),
        meta: {
          title: 'props',
          hidden: false, //菜单是否隐藏
          icon: 'Setting', //菜单图标
        },
      },
      {
        path: '/passArgs/event',
        name: 'Event',
        component: () => import('../demo/event/EventTest.vue'),
        meta: {
          title: '事件总线',
          hidden: false, //菜单是否隐藏
          icon: 'Grid', //菜单图标
        },
      },
      {
        path: '/passArgs/mitt',
        name: 'Mitt',
        component: () => import('../demo/mittbus/MittTest.vue'),
        meta: {
          title: '自定义事件',
          hidden: false, //菜单是否隐藏
          icon: 'Comment', //菜单图标
        },
      },
      {
        path: '/passArgs/pinia',
        name: 'Pinia',
        component: () => import('../demo/pinia/PiniaTest.vue'),
        meta: {
          title: 'pinia状态',
          hidden: false, //菜单是否隐藏
          icon: 'UploadFilled', //菜单图标
        },
      },
      {
        path: '/passArgs/vmodel',
        name: 'Vmodel',
        component: () => import('../demo/vmodel/VModelTest.vue'),
        meta: {
          title: 'v-model',
          hidden: false, //菜单是否隐藏
          icon: 'Share', //菜单图标
        },
      },
      {
        path: '/passArgs/attrs',
        name: 'Attrs',
        component: () => import('../demo/attrs/AttrsTest.vue'),
        meta: {
          title: 'attrs',
          hidden: false, //菜单是否隐藏
          icon: 'HelpFilled', //菜单图标
        },
      },
      {
        path: '/passArgs/refs',
        name: 'Refs',
        component: () => import('../demo/refs/RefTest.vue'),
        meta: {
          title: 'refs和parent',
          hidden: false, //菜单是否隐藏
          icon: 'HomeFilled', //菜单图标
        },
      },
    ],
  },
]
